package com.lemurian.entity;
// Generated Jan 13, 2012 10:56:58 AM by Hibernate Tools 3.2.1.GA


import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.lemurian.entity.utils.DefaultPersistence;

/**
 * UserType generated by aditya
 */
@Entity
@Table(name="tb_category")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@BatchSize(size=1000)
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Category extends DefaultPersistence implements Serializable {

	private static final long serialVersionUID = 1L;
	private String name;
    private String description;
    
    @ManyToOne()
	@JoinColumn(name="parent_id")
    private Category parent;

    @Column(name="description", length=45)
    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Column(name="name", length=45)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Category getParent() {
		return parent;
	}

	public void setParent(Category parent) {
		this.parent = parent;
	}
	
}